package com.kamkor.interviewer.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.kamkor.interviewer.shared.InterviewDetails;

/**
 * 
 * @author kamkor
 *
 */
public class CreateInterviewEvent extends GwtEvent<CreateInterviewEventHandler> {
	public static Type<CreateInterviewEventHandler> TYPE = new Type<CreateInterviewEventHandler>();

	private InterviewDetails interviewDetails;
	
	public CreateInterviewEvent(InterviewDetails interviewDetails) {
		super();
		this.interviewDetails = interviewDetails;
	}	
	
	@Override
	protected void dispatch(CreateInterviewEventHandler handler) {
		handler.onCreateInterview(this);		
	}

	@Override
	public Type<CreateInterviewEventHandler> getAssociatedType() {
		return TYPE;
	}

	public InterviewDetails getInterviewDetails() {
		return interviewDetails;
	}
}
